package com.itheima.d1_thread_api;

/**
 * 目标：掌握sleep方法,join方法的作用。
 */
public class ThreadTest2 {
    public static void main(String[] args) throws Exception {
//        for (int i = 10; i > 0; i--) {
//            System.out.println(i);
//            Thread.sleep(1000);
//        }
//        System.out.println("发射");


        Thread t1 = new Thread(() -> {
            System.out.println("A");
        });Thread t2 = new Thread(() -> {
            System.out.println("b");
        });Thread t3 = new Thread(() -> {
            System.out.println("c");
        });
        t1.start();
        t1.join();
        t2.start();
        t3.join();
        t3.start();


    }
}
